﻿using TradeMeSDK;

namespace TradeMo
{
	public class ShippingViewModel : BaseViewModel
	{
		public ShippingOption ShippingOption { get; set; }

		public ShippingViewModel() { }
		public ShippingViewModel(string comment)
		{
			ShippingOption = new ShippingOption { Type = "Comment", Price = 0, Method = comment};
		}
		public string ShippingAmount
		{
			get
			{
				if (ShippingOption.Price == 0) return "";
				return string.Format("${0:0.00}", ShippingOption.Price);
			}
		}

		private bool _isSelected;
		public bool IsSelected
		{
			get { return _isSelected; }
			set { _isSelected = value; NotifyPropertyChanged("IsSelected"); }
		}

		public bool IsLoggedIn
		{
			get { return App.TradeMe.IsLoggedIn; }
		}

		private bool _enableSelection;
		public bool EnableSelection
		{
			get { return _enableSelection; }
			set { _enableSelection = value; NotifyPropertyChanged("EnableSelection"); }
		}
	}
}